Optimal. Leaf size=56 \[ \frac{(A+C) \sin (c+d x)}{d}-\frac{A \sin ^3(c+d x)}{3 d}+\frac{B \sin (c+d x) \cos (c+d x)}{2 d}+\frac{B x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0837534, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {4047, 2635, 8, 4044, 3013} \[ \frac{(A+C) \sin (c+d x)}{d}-\frac{A \sin ^3(c+d x)}{3 d}+\frac{B \sin (c+d x) \cos (c+d x)}{2 d}+\frac{B x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4047
Rule 2635
Rule 8
Rule 4044
Rule 3013
Rubi steps
\begin{align*} \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=B \int \cos ^2(c+d x) \, dx+\int \cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx\\ &=\frac{B \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} B \int 1 \, dx+\int \cos (c+d x) \left (C+A \cos ^2(c+d x)\right ) \, dx\\ &=\frac{B x}{2}+\frac{B \cos (c+d x) \sin (c+d x)}{2 d}-\frac{\operatorname{Subst}\left (\int \left (A+C-A x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac{B x}{2}+\frac{(A+C) \sin (c+d x)}{d}+\frac{B \cos (c+d x) \sin (c+d x)}{2 d}-\frac{A \sin ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.0976718, size = 53, normalized size = 0.95 \[ \frac{3 (3 A+4 C) \sin (c+d x)+A \sin (3 (c+d x))+3 B \sin (2 (c+d x))+6 B c+6 B d x}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.051, size = 57, normalized size = 1. \begin{align*}{\frac{1}{d} \left ({\frac{A \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}}+B \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +C\sin \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.930441, size = 74, normalized size = 1.32 \begin{align*} -\frac{4 \,{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A - 3 \,{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B - 12 \, C \sin \left (d x + c\right )}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.480306, size = 113, normalized size = 2.02 \begin{align*} \frac{3 \, B d x +{\left (2 \, A \cos \left (d x + c\right )^{2} + 3 \, B \cos \left (d x + c\right ) + 4 \, A + 6 \, C\right )} \sin \left (d x + c\right )}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18811, size = 186, normalized size = 3.32 \begin{align*} \frac{3 \,{\left (d x + c\right )} B + \frac{2 \,{\left (6 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 3 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 6 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 4 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 12 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 6 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 3 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 6 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]